home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / awe2-0_1.lha / awe2-0.1 / Src / RCS / DiscreteUniform.cc,v < prev    next >
Text File  |  1989-07-18  |  1KB  |  68 lines

  1. head     3.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    grunwald:3.2; strict;
  6. comment  @@;
  7.  
  8.  
  9. 3.2
  10. date     89.02.20.15.34.13;  author grunwald;  state Exp;
  11. branches ;
  12. next     3.1;
  13.  
  14. 3.1
  15. date     88.12.20.13.48.40;  author grunwald;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @@
  22.  
  23.  
  24. 3.2
  25. log
  26. @Start using Gnu library heaps for schedulers
  27. @
  28. text
  29. @/* 
  30. Copyright (C) 1988 Free Software Foundation
  31.     written by Dirk Grunwald (grunwald@@cs.uiuc.edu)
  32.  
  33. This file is part of GNU CC.
  34.  
  35. GNU CC is distributed in the hope that it will be useful,
  36. but WITHOUT ANY WARRANTY.  No author or distributor
  37. accepts responsibility to anyone for the consequences of using it
  38. or for whether it serves any particular purpose or works at all,
  39. unless he says so in writing.  Refer to the GNU CC General Public
  40. License for full details.
  41.  
  42. Everyone is granted permission to copy, modify and redistribute
  43. GNU CC, but only under the conditions described in the
  44. GNU CC General Public License.   A copy of this license is
  45. supposed to have been given to you along with GNU CC so you
  46. can know your rights and responsibilities.  It should be in a
  47. file named COPYING.  Among other things, the copyright notice
  48. and this notice must be preserved on all copies.  
  49. */
  50.  
  51. #include <DiscreteUniform.h>
  52. #include <math.h>
  53.  
  54. double DiscreteUniform::operator()()
  55. {
  56.     long tmp = long(floor(delta * pGenerator -> asDouble()));
  57.     return( double(pLow + tmp) );
  58. }
  59. @
  60.  
  61.  
  62. 3.1
  63. log
  64. @Steay version
  65. @
  66. text
  67. @@
  68.